const dist="dist"
import json from 'rollup-plugin-json'
import babel from 'rollup-plugin-babel';

export default{
   input:"main.js",
   output:[{
     name:"bundle-cjs",
     file:`${dist}/bundle-cjs.js`,
     format:"cjs",
     paths: {
      d3: 'https://d3js.org/d3.v4.min'
    }
   },
   {
    file:`${dist}/bundle-es.js`,
    format:"es"
  }
  ],
  plugins: [ 
    json() ,
    babel({
      exclude: 'node_modules/**' // 只编译我们的源代码
    })],
  banner: '/* my-library version 1.0.0 */',
  footer: '/* follow me on  */'
}